Example of Using MySQL Console

Basic MySQL query statements

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| report_backup      |
| report_sample      |
+--------------------+
4 rows in set (0.01 sec)

mysql> use report_sample;
Query OK, 0 rows affected (0.00 sec)

mysql> show tables;
+-------------------------+
| Tables_in_report_sample |
+-------------------------+
| clients                 |
| customer                |
| items                   |
| orders                  |
| parts                   |
| plbiolife               |
+-------------------------+
6 rows in set (0.01 sec)

mysql> select Description, Cost from parts where PartNo = 2619;
+--------------------+-------+
| Description        | Cost  |
+--------------------+-------+
| Navigation Compass | 9.177 |
+--------------------+-------+
1 row in set (0.03 sec)

mysql>